<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <form action="${upfile==null?'/upfile/submit':'/upfile/update'}" method="post" enctype="multipart/form-data">
            <table>
                <tbody>
                    <tr>
                        <td><label>id</label></td>  
                        <td><input name="upfile.id" value="${upfile.id}"></td>
                    </tr>
                    <tr>
                        <td><label>文件标题</label></td>
                        <td><input type="text" name="upfile.title" value="${upfile.title}" placeholder="请输入标题"/></td>
                    </tr>
                    <tr>
                        <td><label>选择文件</label></td>
                        <td><input name="file" type="file"/><img src="/${upfile.src}" alt=""></td>
                    </tr>
                    <tr>
                        <td><label>备注信息</label></td>
                        <td><textarea type="text" name="upfile.remark" placeholder="请输入备注信息">${upfile.remark}</textarea></td>
                    </tr>
                    <tr>
                        <td><label></label></td>
                        <td><button type="submit">提交</button></td>
                    </tr>
                </tbody>          
            </table>
        </form>                                       
    </body>
</html>
